package com.sheng.service;

import com.github.pagehelper.PageInfo;
import com.sheng.domian.User;

import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

@Transactional(readOnly = true)
public interface UserService {
    //    添加用户
    @Transactional(readOnly = false, isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED, timeout = 6)
    public boolean save(User user);

    //    修改用户
    @Transactional(readOnly = false)
    public boolean update(User user);

    //     删除用户
    @Transactional(readOnly = false)
    public boolean delete(Integer uuid);

    //    查询单个用户信息
    @Transactional(readOnly = true, isolation = Isolation.REPEATABLE_READ, propagation = Propagation.SUPPORTS)
    public User get(Integer uuid);

    // 查询全部用户信息

    public PageInfo<User> getAll(int page, int size);

    //    根据用户名密码查询个人信息
    public User login(String userName, String password);

}
